package cn.net.yto.school.dao.entities;

import cn.net.yto.base.dao.entities.TAccount;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * tb_clazz 实体类
 * Created by gaojing
 * Wed Jul 18 19:29:33 CST 2018
 */
@Entity
@Table(name = "tb_clazz")
@Data
@NoArgsConstructor
public class TbClazz implements Serializable {


    private static final long serialVersionUID = 4572811569165756379L;
    /**
     * 班级id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "cls_id", nullable = false, length = 11, unique = true)
    private  Integer id;

    /**
     * 班级名称
     */
    @Column(name = "cls_name", nullable = false, length = 32)
    private String clsName;

    /**
     * 班级宣言
     */
    @Column(name = "cls_content", nullable = false, length = 1024)
    private String clsContent;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Timestamp createTime;

    /**
     * 修改时间
     */
    @Column(name = "update_time")
    private Timestamp updateTime;

    /**
     * 操作员
     */
    @ManyToOne
    @JoinColumn(name = "actor", referencedColumnName = "ACCT_ID")
    private TAccount actor;


    public TbClazz(Integer id) {
        this.id = id;
    }
}

